The size of the bit stream, e.g. the bandwidth of the bit stream, generated when encoding a signal (such as an audio or a video signal) with pre-defined quality settings (e.g. using Variable Bit Rate encoding, or VBR) varies widely based on the contents of the signal, both when comparing different signals (e.g., the encoded size of a football match is typically greater than the encoded size of a dialogue scene) and when comparing different time portions of the same signal (e.g., the encoded size of a football match typically increases significantly when the camera moves from a close up of a player with blurred background to a wide angle shot including a complex crowd).
Since communication infrastructures (such as broadcast infrastructure) typically provide fixed amounts of bandwidth to transmit a bit stream, encoders must often implement encoding strategies that vary quality settings over time in order to generate a bit stream at a constant bit rate (Constant Bit Rate encoding, or CBR).
When more than one signal is multiplexed into a single data stream (“multiplexed bundle of signals”) to be transported via a given communication link, the constraint of enforcing a constant bit rate over a defined period refers to the bundle of signals, rather than to a single signal.
Many techniques are known in the art to deal with the multiplexing of different signals into a same data stream with an overall CBR. In particular, the two most frequent approaches are based either on forcing a constant bit rate (CBR) for each of the signals or on applying so-called “statistical multiplexing” techniques.
Forcing independent CBR encoding for each of the signals in the bundle indeed achieves the objective of an overall constant bit rate for the bundle, but is typically suboptimal from a quality point of view, since—for a given time chunk of the bundle—the encoder may need to significantly reduce the quality settings used to encode a complex signal in order to meet its individual CBR, while at the same time other simpler signals of the bundle are encoded at unnecessarily high quality settings.
Statistical multiplexing techniques achieve the goal of obtaining an overall CBR for the bundle without necessarily forcing a CBR for each of the signals in the bundle. These techniques achieve that objective by iteratively performing multiple encodings of the same time chunk (such as the time interval corresponding to a Group of Pictures, or GOP) of the multiplexed bundle of signals, with a feedback loop from one encoding attempt to the next.
For instance, a first encoding of the time chunk of the bundle is performed with given quality settings for each of the signals in the bundle. The statistical multiplexer receives the encoded data stream and measures the bit rate generated for each of the signals, and consequently feeds back to the encoder a new set of quality settings for each of the signals in the bundle, so as to optimize the allocation of the total bit rate available for the bundle according to pre-defined objectives (e.g., priority level of given signals, etc.).
Statistical multiplexing with overall CBR generally achieve better quality results than independent single-signal CBR, but it also comes with disadvantages.
First of all, encoding latency is typically higher, since each time chunk must be encoded multiple times (in particular, at least twice): this drawback is particularly significant since multiplexing is often used in the context of linear channel broadcasting, wherein encoding must happen in real time.
Secondly, statistical multiplexing decisions are based on limited data (e.g., the result of a single encoding attempt) over a relatively long time chunk (i.e., several time samples): as a consequence, the decisions taken by the statistical multiplexer are based on heuristics and extrapolations, and are often suboptimal.